package com.sina.rd.dsp.zookeeper;

public class StringUtil {
	public static String getUrl(String param){
		String url = "";
		if(param==null||param.equals("")||param.equals("null")){
			return url;
		}else{
			if(!param.startsWith("-")){
				url = "/"+param.replaceAll("-", "/");
			}else{
				url = param.replaceAll("-", "/");
			}
			if(url.endsWith("/")&&url.length()!=1){
				url = url.substring(0,url.length()-1);
			}
			return url;
		}
	}
	
	public static String getParam(String url){
		return url.replaceAll("/", "-");
	}
	
	public static boolean isNotBlank(String...field){
		boolean flag = true;
		for(String tmp :field){
			if(field==null||"".equals(field)||tmp.contains(","))
				flag = false;
		}
		return flag;
	}

    public static void  main(String args[]){
        System.out.println();
    }
}
